package entity

import (
	"fmt"
	"github.com/jinzhu/gorm"
)

type GroupInvite struct {
	gorm.Model
	MemberId     uint `json:"member_id"`
	GroupId      uint `json:"group_id"`
	OwnerUser    uint `json:"owner_user"`
	IsRefused    uint `json:"is_refused"`
	IsMemberDeal uint `json:"is_member_deal"` // 用户是否处理过
}

func (GroupInvite) TableName() string {
	return "group_invite"
}

func (g *GroupInvite) String() string {
	return fmt.Sprintf(
		"GroupInvite{ID: %d, MemberId: %d, GroupId: %d, OwnerUser: %s, IsRefused: %t}",
		g.ID,
		g.MemberId,
		g.GroupId,
		g.OwnerUser,
		g.IsRefused,
	)
}
